package xyz.jangle.design.singleton;
/**
 * 单件模式
 * @author Administrator
 *
 */
public class Singleton {
	
	private static Singleton uniqueInstance;
	
	private Singleton() {
		System.out.println("简单的单例模式");
	};
	
	public static synchronized Singleton getInstance() {
		if(uniqueInstance==null) {
			uniqueInstance= new Singleton();
		}
		return uniqueInstance;
	}

}
